home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Super Shareware Collection
/
Super Shareware Collection.iso
/
os_2
/
pm22x333.zip
/
EXAMPLE2.ASM
< prev
next >
Wrap
Assembly Source File
|
1994-02-21
|
2KB
|
59 lines
; Demonstration of the use of selectors.
.386p
code32 segment para public use32
assume cs:code32, ds:code32
include pmode.inc
public _main
;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
; DATA
;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
; CODE
;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
;═════════════════════════════════════════════════════════════════════════════
_main:
sti
mov v86r_ax,3 ; Clear the screen
mov al,10h
int 33h
call _getselector ; Allocate selector
mov edx,0b8000h ; Set base to text vidmem
call _setselector
mov es,ax ; ES -> text vidmem
mov ax,736h ; Write first line of '6's
mov ecx,80
xor edi,edi
rep stosw
mov bx,es ; DS -> text vidmem
mov ds,bx
mov ecx,80*24 ; Write next 24 lines of '6's
xor esi,esi
rep movsw
mov ax,cs:_seldata ; Remember, DS is something else now
mov ds,ax
mov es,ax
mov v86r_ah,0 ; Just wait for a key
mov al,16h
int 33h
jmp _exit
code32 ends
end